<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta charset="UTF-8" />
    <title>答案详情</title>
    <link rel="stylesheet" href="css/yueke.css">
    <script type="text/javascript" src="js/jquery.min.js"></script>
    <script type="text/javascript" src="underscore/underscore-min.js"></script>
    <script type="text/javascript" src="js/list_more.js"></script>
    <!--建议手动加在语言，避免在ie下有时因为加载语言失败导致编辑器加载失败-->
    <!--这里加载的语言文件会覆盖你在配置项目里添加的语言类型，比如你在配置项目里配置的是英文，这里加载的中文，那最后就是中文-->
    <script type="text/javascript" src="js/fixation.js"></script>
    <script type="text/javascript" src="js/paging.js"></script>
</head>
<body class="background_grey">
    <div class="header">
        <div class="header_in">
            <div class="header_logo">
                <h1></h1>
                <img src="images/index_log.jpg" />
            </div>
            <div class="header_nav">
                <ul>
                    <li><a href="model_news_list.html">前沿资讯</a></li>
                    <li><a href="model_problem_list.html">互动问答</a></li>
                    <li><a href="model_personage_center.html">帮助中心</a></li>
                </ul>
            </div>
            <div class="header_info">
                <div class="header_info_find"><a href="#">寻找合作伙伴</a></div>
                <div class="header_register">
                    <a href="#">登录</a>|
                    <a href="#">注册</a>
                </div>
                <div class="header_become">
                    <a href="#">成为我们的专家</a>
                </div>
            </div>
            <div class="clear_both"></div>
        </div>
    </div>
    <div class="problem_detail problem_detail_new answer_detail_new">
        <div class="problem_detail_left">
            <div class="problem_detail_left_title">
                <div class="problem_detail_left_item_title">
                    <div class="problem_detail_left_item_img">
                        <img src="images/problem_list_img2.jpg" alt="" />
                    </div>
                    <div class="problem_detail_left_item_title_person"><span>张光斗</span>（中医院院士）<i>发起了问题</i></div>
                </div>
                <div class="problem_detail_left_title_h2">
                    <a href="">如何看待北京大学医学部周德敏/张礼和课题组在病毒疫苗领域取得重大突破？</a>
                </div>
                <p class="problem_detail_left_title_detail">用户运营，产品运营，社区运营，活动运营共性都是围绕人的关系维系而出发的，只是其各自侧重点略有不同。用户运营，产品运营，社区运营，活动运营共性都是围绕人的关系维系而出发的，只是其各自侧重点略有不同。</p>
                <div class="problem_detail_left_item_btn">
                    <span class="more">显示全部</span>
                </div>
                <div class="problem_detail_left_title_num"><span class="label">所属标签</span><span class="share">分享</span></div>
                <div class="problem_detail_left_item_title_link"><a href="">查看全部12条</a></div>
            </div>
            <div class="problem_detail_left_list">
                <div class="problem_detail_left_list_title">
                    <span class="answer">13个答案</span>
                    <em>排序方式</em>
                </div>
                <ul id="answer_list">
                    <li class="problem_detail_left_item" data_id="1">
                        <div class="problem_detail_left_item_left active">
                            123
                        </div>
                        <div class="problem_detail_left_item_right">
                            <div class="problem_detail_left_item_title">
                                <div class="problem_detail_left_item_img">
                                    <img src="images/problem_list_img2.jpg" alt="" />
                                </div>
                                <div class="problem_detail_left_item_title_person"><span>何国波</span>（中医院院士）</div>
                            </div>
                            <div class="problem_detail_left_item_detail">运营的核心目的是为了产品能够活得更好更持久，尽可能放大产品的覆盖用户量和延长产品的生命周期。而上述用户运营、活动运营、产品运营等都是看待运营的一种视角和去梳理工作的方式。它们最主要的区别在于：考虑问题的中心点和侧重点有所不同。就目前而言，互联网行业内相对比较
                            </div>
                            <textarea name="" class="problem_detail_left_item_detail_textarea"> 运营的核心目的是为了产品能够活得更好更持久，尽可能放大产品的覆盖用户量和延长产品的生命周期。而上述用户运营、活动运营、产品运营等都是看待运营的一种视角和去梳理工作的方式。它们最主要的区别在于：考虑问题的中心点和侧重点有所不同。就目前而言，互联网行业内相对比较 </textarea>
                            <div class="problem_detail_left_item_info">
                                <span>发布于2016-12-14</span>    
                                <span class="answer active">190 回答</span>
                                <span class="share">
                                    分享
                                    <div class="bdsharebuttonbox"><a href="#" class="bds_more" data-cmd="more"></a></div>
<script>window._bd_share_config={"common":{"bdSnsKey":{},"bdText":"","bdMini":"1","bdMiniList":["tsina","weixin"],"bdPic":"","bdStyle":"1","bdSize":"16"},"share":{}};with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];</script>
                                </span>
                                <span class="revamp" id="compile_revamp">修改答案</span>
                                <span class="evenmore" id="compile_evenmore">
                                    更多
                                    <ol>
                                        <li id="compile_evenmore_delete">删除</li>
                                    </ol>
                                </span>
                                <em class="delete" id="compile_delete">取消</em>
                                <em class="submit" id="compile_submit">提交</em>
                                <div class="clear_both"></div>
                            </div>
                            <div class="problem_detail_comment">
                                <div class="problem_detail_comment_icon"></div>
                                <div class="problem_detail_comment_list">
                                    <ul id="comment_list">
                                        <li class="problem_detail_comment_item">
                                            <div class="problem_detail_comment_item_left">
                                                <img src="images/problem_list_img2.jpg" alt="" />
                                            </div>
                                            <div class="problem_detail_comment_item_right">
                                                <div class="problem_detail_comment_item_right_name">张三</div>
                                                <div class="problem_detail_comment_item_right_info">圣三一居然没有John Ford，老头子可是黑泽明和莱昂内的偶像啊。</div>
                                                <div class="problem_detail_comment_item_right_time">
                                                    <span>2016-12-01 12:21</span>
                                                    <span class="reply" ontab="1">回复</span>
                                                </div>
                                                <div class="problem_detail_comment_item_right_textarea">
                                                    <textarea name=""></textarea>
                                                    <div class="problem_detail_comment_item_right_textarea_btn">
                                                        <span class="cancel">取消</span>
                                                        <span class="comment">评论</span>
                                                    </div>
                                                </div>
                                            </div>
                                        </li>
                                        <!-- <li class="problem_detail_comment_item">
                                            <div class="problem_detail_comment_item_left">
                                                <img src="images/problem_list_img2.jpg" alt="" />
                                            </div>
                                            <div class="problem_detail_comment_item_right">
                                                <div class="problem_detail_comment_item_right_name">张三</div>
                                                <div class="problem_detail_comment_item_right_info">圣三一居然没有John Ford，老头子可是黑泽明和莱昂内的偶像啊。</div>
                                                <div class="problem_detail_comment_item_right_time">
                                                    <span>2016-12-01 12:21</span>
                                                    <span class="reply" ontab="1">回复</span>
                                                </div>
                                                <div class="problem_detail_comment_item_right_textarea">
                                                    <textarea name=""></textarea>
                                                    <div class="problem_detail_comment_item_right_textarea_btn">
                                                        <span class="cancel">取消</span>
                                                        <span class="comment">评论</span>
                                                    </div>
                                                </div>
                                            </div>
                                        </li>
                                        <li class="problem_detail_comment_item">
                                            <div class="problem_detail_comment_item_left">
                                                <img src="images/problem_list_img2.jpg" alt="" />
                                            </div>
                                            <div class="problem_detail_comment_item_right">
                                                <div class="problem_detail_comment_item_right_name">张三</div>
                                                <div class="problem_detail_comment_item_right_info">圣三一居然没有John Ford，老头子可是黑泽明和莱昂内的偶像啊。</div>
                                                <div class="problem_detail_comment_item_right_time">
                                                    <span>2016-12-01 12:21</span>
                                                    <span class="reply" ontab="1">回复</span>
                                                </div>
                                                <div class="problem_detail_comment_item_right_textarea">
                                                    <textarea name=""></textarea>
                                                    <div class="problem_detail_comment_item_right_textarea_btn">
                                                        <span class="cancel">取消</span>
                                                        <span class="comment">评论</span>
                                                    </div>
                                                </div>
                                            </div>
                                        </li> -->
                                    </ul>
                                    <div class="problem_detail_comment_num">
                                        <!-- <span class="prev" id="prev">&lt;</span> -->
                                        <div class="problem_detail_comment_in" id="page_num">
                                            <a class="active" href="#1">1</a>
                                            <a class=" " href="#2">2</a>
                                            <a class=" " href="#3">3</a>
                                            <a class=" " href="#4">4</a>
                                            <a class=" " href="#5">5</a>
                                        </div>
                                        <!-- <i>...</i>
                                        <span class="next" id="next">&gt;</span> -->
                                    </div>
                                </div>
                                <div class="problem_detail_comment_write">
                                    <textarea name="" placeholder="写下你的评论" id="comment_write"></textarea>
                                    <div class="problem_detail_comment_write_btn">
                                        <span class="comment_cancel">取消</span>
                                        <span class="comment_comment">评论</span>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="clear_both"></div>
                    </li>
                </ul>
            </div>
            <div class="problem_detail_left_list_more">
                <div class="problem_detail_left_list_more_title">
                    更多答案
                </div>
                <ul id="answer_list_more">
                    <li class="problem_detail_left_item">
                        <div class="problem_detail_left_item_left">
                            123
                        </div>
                        <div class="problem_detail_left_item_right">
                            <div class="problem_detail_left_item_title">
                                <div class="problem_detail_left_item_img">
                                    <img src="images/problem_list_img2.jpg" alt="" />
                                </div>
                                <div class="problem_detail_left_item_title_person"><span>何国波</span>（中医院院士）</div>
                            </div>
                            <div class="problem_detail_left_item_detail problem_detail_left_item_detail_list">
                                运营的核心目的是为了产品能够活得更好更持久，尽可能放大产品的覆盖用户量和延长产品的生命周期。而上述用户运营、活动运营、产品运营等都是看待运营的一种视角和去梳理工作的方式。它们最主要的区别在于：考虑问题的中心点和侧重点有所不同。就目前而言，互联网行业内相对比较
                            </div>
                            <div class="problem_detail_left_item_btn problem_detail_left_list_more_item_btn">
                                <span class="more">显示全部</span>
                            </div>
                            <div class="problem_detail_left_item_info problem_detail_left_list_more_item_info">
                                <span>发布于2016-12-14</span>    
                                <span class="answer">190 回答</span>
                                <span class="share">分享
                                    <div class="bdsharebuttonbox"><a href="#" class="bds_more" data-cmd="more"></a></div>
<script>window._bd_share_config={"common":{"bdSnsKey":{},"bdText":"","bdMini":"1","bdMiniList":["tsina","weixin"],"bdPic":"","bdStyle":"1","bdSize":"16"},"share":{}};with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];</script>
                                </span>
                            </div>
                        </div>
                        <div class="clear_both"></div>
                    </li>
                    <li class="problem_detail_left_item">
                        <div class="problem_detail_left_item_left active">
                            123
                        </div>
                        <div class="problem_detail_left_item_right">
                            <div class="problem_detail_left_item_title">
                                <div class="problem_detail_left_item_img">
                                    <img src="images/problem_list_img2.jpg" alt="" />
                                </div>
                                <div class="problem_detail_left_item_title_person"><span>何国波</span>（中医院院士）</div>
                            </div>
                            <div class="problem_detail_left_item_detail problem_detail_left_item_detail_list">
                                运营的核心目的是为了产品能够活得更好更持久，尽可能放大产品的覆盖用户量和延长产品的生命周期。而上述用户运营、活动运营、产品运营等都是看待运营的一种视角和去梳理工作的方式。它们最主要的区别在于：考虑问题的中心点和侧重点有所不同。就目前而言，互联网行业内相对比较
                            </div>
                            <div class="problem_detail_left_item_btn problem_detail_left_list_more_item_btn">
                                <span class="more">显示全部</span>
                            </div>
                            <div class="problem_detail_left_item_info problem_detail_left_list_more_item_info">
                                <span>发布于2016-12-14</span>    
                                <span class="answer">190 回答</span>
                                <span class="share">分享
                                    <div class="bdsharebuttonbox"><a href="#" class="bds_more" data-cmd="more"></a></div>
<script>window._bd_share_config={"common":{"bdSnsKey":{},"bdText":"","bdMini":"1","bdMiniList":["tsina","weixin"],"bdPic":"","bdStyle":"1","bdSize":"16"},"share":{}};with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];</script>
                                </span>
                            </div>
                        </div>
                        <div class="clear_both"></div>
                    </li>
                </ul>
                <div class="problem_detail_left_list_more_answer"><a href="">查看全部12个答案</a></div>
            </div>
        </div>
        <div class="problem_detail_right" id="fixed_right">
            <div class="problem_detail_right_top">
                <div class="problem_detail_right_btn blue" id="btn_attention">关注问题</div>
                <p class="problem_detail_right_top_info"><span>125</span>人关注该问题</p>
            </div>
            <div class="problem_detail_right_bottom">
                <div class="problem_detail_right_bottom_title">
                    相关问题
                </div>
                <ul class="news_list_right_list">
                    <li class="news_list_right_item">
                        <div class="news_list_right_item_font"><a href="#">最新资讯最新资讯最新资讯最新资讯最新资讯最新最新资讯</a></div>
                        <div class="news_list_right_item_answer">12个回答</div>
                    </li>
                    <li class="news_list_right_item">
                        <div class="news_list_right_item_font"><a href="#">最新资讯最新资讯最新资讯最新资讯最新资讯最新最新资讯</a></div>
                        <div class="news_list_right_item_answer">12个回答</div>
                    </li>
                    <li class="news_list_right_item">
                        <div class="news_list_right_item_font"><a href="#">最新资讯最新资讯最新资讯最新资讯最新资讯最新最新资讯</a></div>
                        <div class="news_list_right_item_answer">12个回答</div>
                    </li>
                </ul>
            </div>
        </div>
    </div>
    <div class="index_footer">
        <div class="index_footer_link">
            <a href="">新闻公告</a>|
            <a href="">关于我们</a>|
            <a href="">联系我们</a>|
            <a href="">用户协议</a>
        </div>
        <p class="index_footer_copy">Copyright©2016 yk-zb.com 粤科众包 版权所有 粤ICP备16027165号-1</p>
    </div>
    <div class="shadow">
        <div class="problem_shadow">
            <div class="problem_shadow_title">
                我要提问<span>X</span>
            </div>
            <div class="problem_shadow_main">
                <input type="text" placeholder="写下你的问题" class="problem_shadow_ipt"/>
                <p>问题描述（选填）：</p>
                <textarea name="" id="" cols="30" rows="10" placeholder="请填写问题的详细描述···" class="problem_shadow_textarea"></textarea>
                <p>选择标签：</p>
                <select name="" id="" class="problem_shadow_select">
                    <option value="1">1</option>
                    <option value="2">2</option>
                    <option value="3">3</option>
                    <option value="4">4</option>
                </select>
                <div class="problem_shadow_btn">
                    <span class="publish" id="btn_publish">发布</span>
                    <span class="abolish" id="btn_abolish">取消</span>
                </div>
            </div>
        </div>
        <div class="delete_answer_shadow">
            <div class="delete_answer_shadow_title">确定删除您的回答？</div>
            <p>删除后关于该回答的数据都会被清除</p>
            <div class="problem_shadow_btn">
                <span class="publish" id="delete_answer_publish">确定</span>
                <span class="abolish" id="delete_answer_abolish">取消</span>
            </div>
        </div>
    </div>
    <script id="commentItem" type="text/template">
        <li class="problem_detail_comment_item" data_id="1">
            <div class="problem_detail_comment_item_left">
                <img src="<#= url_img #>" alt="" />
            </div>
            <div class="problem_detail_comment_item_right">
                <div class="problem_detail_comment_item_right_name"><#= title #></div>
                <div class="problem_detail_comment_item_right_info"><#= detail #></div>
                <div class="problem_detail_comment_item_right_time">
                    <span><#= time #></span>
                    <span class="reply" ontab="1">回复</span>
                </div>
                <div class="problem_detail_comment_item_right_textarea">
                    <textarea name=""></textarea>
                    <div class="problem_detail_comment_item_right_textarea_btn">
                        <span class="cancel">取消</span>
                        <span class="comment">评论</span>
                    </div>
                </div>
            </div>
        </li>
    </script>
</body>
</html>
<script type="text/javascript">
    $(function() {
        /*回复评论分页*/
        var nowNum = 1;
        var allNum = 5;
        function paging(nowNum,allNum){
            var obj = document.getElementById("page_num");
            page({
                obj : obj,
                nowNum : nowNum,
                allNum : allNum,
                callback : function (now,all){
                    /*$.ajax({
                        type: "get",
                        url: url,
                        rnd: rnd,
                        dataType: "json",
                        success: function(result) {
                                if(result.code == 1){
                                      var list = result.data.order_list;
                                      //每次都返回总页数
                                      pages = result.data.page_size;
                                      console.log(result.data);
                                      for(var i = 0; i < list.length; i++){
                                            var t = _.template($("#rowItem").text());
                                            var htmlTxt = t(list[i]);
                                            console.log(t,htmlTxt)
                                            $('#deal_table').append(htmlTxt);
                                      }
                                      if (page >= pages){
                                              $("#moreBt").html('没有更多');
                                      }
                                }else{
                                          UBox.show('加载失败', -1);
                                }
                        }
                    });*/
                    $('#comment_list').html('');
                    var attr = [
                        {
                        time : '2016-05-23 21:09',
                        url_img : 'images/news_detail_img.jpg',
                        title : '1',
                        detail : '网易云信全新推出T服务，独创1对1技术顾问实时响应创1对1技术顾问实时响应创1对1技术顾问实时响应解决每个技术难题，让你不再惧怕上云'
                    },{
                        time : '2016-05-23 21:09',
                        url_img : 'images/news_detail_img.jpg',
                        title : '2',
                        detail : '网易云信全新推出T服务，独创1对1技术顾问实时响应创1对1技术顾问实时响应创1对1技术顾问实时响应解决每个技术难题，让你不再惧怕上云'
                    },{
                        time : '2016-05-23 21:09',
                        url_img : 'images/news_detail_img.jpg',
                        title : '3',
                        detail : '网易云信全新推出T服务，独创1对1技术顾问实时响应创1对1技术顾问实时响应创1对1技术顾问实时响应解决每个技术难题，让你不再惧怕上云'
                    },{
                        time : '2016-05-23 21:09',
                        url_img : 'images/news_detail_img.jpg',
                        title : '4',
                        detail : '网易云信全新推出T服务，独创1对1技术顾问实时响应创1对1技术顾问实时响应创1对1技术顾问实时响应解决每个技术难题，让你不再惧怕上云'
                    },{
                        time : '2016-05-23 21:09',
                        url_img : 'images/news_detail_img.jpg',
                        title : '5',
                        detail : '网易云信全新推出T服务，独创1对1技术顾问实时响应创1对1技术顾问实时响应创1对1技术顾问实时响应解决每个技术难题，让你不再惧怕上云'
                    }
                    ];
                    for(var i = 0; i< 5; i++){
                        var t = _.template($("#commentItem").text());
                        var htmlTxt = t(attr[now-1]);
                        console.log(t,htmlTxt)
                        $('#comment_list').append(htmlTxt);
                    }
                    console.log("当前页"+now+":总页数"+all);
                }
            });
        };
        paging(nowNum,allNum);
        /*文字省略以及点击more按钮*/
        (function fnMore(){
            var arrStr = [];
            $('.problem_detail_left_item_detail_list').each(function(index, el) {
                var strOld = $(this).html();
                var strNow = strOld ;
                arrStr.push(strOld);
                console.log(arrStr);

                if(strOld.length >= 300){
                    strNow = strOld.substring(0,300) + '······';
                    $('.more').eq(index).show();
                }
                $(this).html(strNow);
            });
            $('.more').click(function(event) {
                var index = $('.more').index(this);
                var oParent1 = $(this).parent().siblings('.problem_detail_left_item_detail_list');
                var oParent2 = $(this).parent().siblings('.problem_detail_left_list_more_item_info');
                oParent1.html(arrStr[index]);
                $(this).hide();
                oParent2.show();
            });
        })();
        /*我要提问*/

        $('#put_questions').click(function(event) {
            $('.shadow').fadeIn();
            return false;
        });
        /*关闭提问弹窗*/
        $('.problem_shadow_title span').click(function(event) {
            $('.shadow').fadeOut();
        });
        /*发布问题*/
        $('#btn_publish').click(function(event) {
            var ipt = $('.problem_shadow_ipt').val();
            var txta = $('.problem_shadow_textarea').val();
            var select = $('.problem_shadow_select').val();
            if(ipt == '' || txta == '' || select == ''){
                return false;
            }
            console.log(ipt,txta,select);
        });
        /*取消提问*/
        $('#btn_abolish').click(function(event) {
            $('.shadow').fadeOut(200,function(){
                $('.problem_shadow_ipt').val('');
                $('.problem_shadow_textarea').val('');
                $('.problem_shadow_select').val('');
            });
        });
        /* 点击下面列表的喜欢按钮 */
        $("#answer_list_more").on("click",'.problem_detail_left_item_left', function(e) {
            var value = parseInt($(this).html());
            if($(this).hasClass('active')){
                $(this).removeClass('active');
                $(this).html(value-1);
            }else{
                $(this).html(value+1);
                $(this).addClass('active');
            }
        });
        /* 点击回答详情的喜欢按钮 */
        $("#answer_list").on("click",'.problem_detail_left_item_left', function(e) {
            var value = parseInt($(this).html());
            if($(this).hasClass('active')){
                $(this).removeClass('active');
                $(this).html(value-1);
            }else{
                $(this).html(value+1);
                $(this).addClass('active');
            }
        });
        /*点击回复评论按钮*/
        $("#answer_list").on("click",'.reply', function(e) {
            if($(this).attr('ontab') == 0){
                $(this).attr('ontab','1');
                $(this).parent().siblings('.problem_detail_comment_item_right_textarea').slideUp();
            }else{
                nowNum = 1;
                $(this).attr('ontab','0');
                // paging(nowNum,allNum);
                $(this).parent().siblings('.problem_detail_comment_item_right_textarea').slideDown();
            }
            
        });
        /*点击回复评论里面的提交*/
        $("#answer_list").on("click",'.comment', function(e) {
            var value = $(this).parent().siblings('textarea').val();
            var name = $(this).parents('.problem_detail_comment_item_right_textarea').siblings('.problem_detail_comment_item_right_name').html();
            value = '@' + name + value;
            console.log(value);
            /*$.ajax({                
                type: "POST",
                url: '', 
                data: {
                        value : value
                      },
                dataType: "json",
                success: function(data){
                        nowNum = 1;
                        paging(nowNum,allNum)
                    },
                error: function(data){
                            // UBox.show("提交失败", -1);
                        } 
                });*/
                nowNum = 1;
                paging(nowNum,allNum)
        }); 
        $("#answer_list").on("click",'.cancel', function(e) {
            $(this).parent().siblings('textarea').val('');
            $(this).parents('.problem_detail_comment_item_right_textarea').slideUp();
        });
        /*最下面的评论框*/
        $("#answer_list").on("focus",'#comment_write', function(e) {
            $(this).siblings('.problem_detail_comment_write_btn').show();
        });
        /*最下面评论框的提交按钮*/
        $("#answer_list").on("click",'.comment_comment', function(e) {
            // alert("message")
            var value = $('#comment_write').val();
            if(value == ''){
                return false;
            }
            console.log(value);
            /*$.ajax({                
                type: "POST",
                url: '', 
                data: {
                        value : value
                      },
                dataType: "json",
                success: function(data){
                        nowNum = 1;
                        $('#comment_write').val('');
                        $(this).parent('.problem_detail_comment_write_btn').hide();
                        paging(nowNum,allNum)
                    },
                error: function(data){
                            // UBox.show("提交失败", -1);
                        } 
                });*/
            nowNum = 2;
            $('#comment_write').val('');
            $(this).parent('.problem_detail_comment_write_btn').hide();
            paging(nowNum,allNum);
        });    
        $("#answer_list").on("click",'.comment_cancel', function(e) {
            $('#comment_write').val('');
            $(this).parent('.problem_detail_comment_write_btn').hide();
        });   
        /*点击回复评论按钮*/
        $("#answer_list").on("click",'.cancel', function(e) {
            var obj = $(this).parent().parent('.problem_detail_comment_item_right_textarea');
            obj.siblings('.problem_detail_comment_item_right_time').children('.reply').attr('ontab','1');
            obj.children('textarea').html('');
            obj.slideUp();
        });
        /*点击回答按钮*/
        $("#answer_list").on("click",'.answer', function(e) {
            /*if($(this).attr('ontab') == 0){
                $(this).attr('ontab','1');
                $(this).parent().siblings('.problem_detail_comment').slideUp();
            }else{
                $(this).attr('ontab','0');
                $(this).parent().siblings('.problem_detail_comment').slideDown();
            }*/
            if($(this).hasClass('active')){
                $(this).removeClass('active');
                $(this).parent().siblings('.problem_detail_comment').slideUp();
            }else{
                $(this).addClass('active');
                $(this).parent().siblings('.problem_detail_comment').slideDown();
            }
        });
        /*更多弹出删除按钮*/
        $("#answer_list").on("click",'#compile_evenmore', function(e) {
            if($(this).hasClass('active')){
                $(this).removeClass('active');
            }else{
                $(this).addClass('active');
                $(this).children('ol').slideDown();
            }
            
        });
        /*点击删除按钮*/
        $("#answer_list").on("click",'#compile_evenmore_delete', function(e) {
            $('.shadow').fadeIn();
            $('.delete_answer_shadow').fadeIn();
            return false;
            
        });
        /*点击删除按钮*/
        $("#answer_list").on("click",'#compile_evenmore_delete', function(e) {
            $('.shadow').fadeIn();
            $('.delete_answer_shadow').fadeIn();
            var dataId = $(this).parents('.problem_detail_left_item').attr('data_id');
            $('.delete_answer_shadow').attr('data_id',dataId);
            return false;
            
        });
        /*确定删除*/
        $('#delete_answer_publish').click(function(event) {
            var dataId = $(this).parents('.delete_answer_shadow').attr('data_id');
            console.log(dataId);
            console.log($(".problem_detail_left_item[data_id='"+dataId+"']").attr('data_id'))
            $(".problem_detail_left_item[data_id='"+dataId+"']").remove();
            $('.shadow').fadeOut();
            $('.delete_answer_shadow').fadeOut();
        });
        /*取消删除*/
        $('#delete_answer_abolish').click(function(event) {
            $('.shadow').fadeOut(200,function(){
                
            });
        });
        /*点击修改答案*/
        $("#answer_list").on("click",'#compile_revamp', function(e) {
            var value = $(this).parent().siblings('.problem_detail_left_item_detail').html();
            var reg=new RegExp("<br>","g"); //创建正则RegExp对象 
            value = value.replace(reg,"\n");
            $(this).parent().siblings('.problem_detail_left_item_detail_textarea').val(value);
            $(this).parent().parent().parent('.problem_detail_left_item').addClass('active');
        });
        /*删除修改*/
        $("#answer_list").on("click",'#compile_delete', function(e) {
            $(this).parent().parent().parent('.problem_detail_left_item').removeClass('active');
        });
        /* 提交修改*/
        $("#answer_list").on("click",'#compile_submit', function(e) {
            var value = $(this).parent().siblings('.problem_detail_left_item_detail_textarea').val();
            value = value.replace(/\n|\r\n/g,"<br>");
            /*$.ajax({
                type: "POST",
                url: url,
                rnd: rnd,
                data: {
                        
                    },
                dataType: "json",
                success: function(result) {
                        if(result.code == 1){
                              $(this).parent().siblings('.problem_detail_left_item_detail').html(value);
                              $(this).parent().parent().parent('.problem_detail_left_item').removeClass('active');
                        }else{
                                  UBox.show('加载失败', -1);
                        }
                }
            });*/
            $(this).parent().siblings('.problem_detail_left_item_detail').html(value);
            $(this).parent().parent().parent('.problem_detail_left_item').removeClass('active');
        });
        $('#btn_attention').click(function(event) {
            
            if($(this).html() == '已关注'){
                /*$.ajax({
                type: "POST",
                url: url,
                rnd: rnd,
                data: {
                        
                    },
                dataType: "json",
                success: function(result) {
                        if(result.code == 1){
                            $(this).css({"background-color":"#309bff","border-color":"#309bff"})
                            $(this).html('关注问题');
                        }else{
                            //UBox.show('加载失败', -1);
                        }
                }
                });*/
                $(this).css({"background-color":"#309bff","border-color":"#309bff"})
                $(this).html('关注问题');
            }else{
                /*$.ajax({
                type: "POST",
                url: url,
                rnd: rnd,
                data: {
                        
                    },
                dataType: "json",
                success: function(result) {
                        if(result.code == 1){
                            $(this).css({"color":"666","background-color":"#ccc","border-color":"#ccc"})
                            $(this).html('已关注');
                        }else{
                            //UBox.show('加载失败', -1);
                        }
                }
                });*/
                $(this).css({"background-color":"#ccc","border-color":"#ccc"})
                $(this).html('已关注');
            }
        });
    });
</script>